docs: gtk_menu_attach_to_widget()
authorMurray Cumming <murrayc@murrayc.com>
Mon, 22 Jul 2013 12:08:11 +0000 (14:08 +0200)
committerMurray Cumming <murrayc@murrayc.com>
Mon, 22 Jul 2013 12:10:53 +0000 (14:10 +0200)
Add a few more clues about why this is useful,
based on
https://mail.gnome.org/archives/gtk-devel-list/2007-November/msg00176.html
and the reference to it from gtk_menu_new_from_model().

gtk/gtkmenu.c

index 5280975e52942ab763b3039348ccb0d06ed03392..d0c757ff8157386ebb4c8cb14a10672d4f33211b 100644 (file)
@@ -1206,6 +1206,11 @@ attach_widget_screen_changed (GtkWidget *attach_widget,
  * Attaches the menu to the widget and provides a callback function
  * that will be invoked when the menu calls gtk_menu_detach() during
  * its destruction.
+ *
+ * If the menu is attached to the widget then it will be destroyed
+ * when the widget is destroyed, as if it was a child widget.
+ * An attached menu will also move between screens correctly if the
+ * widgets moves between screens.
  */
 void
 gtk_menu_attach_to_widget (GtkMenu           *menu,